home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsISHEntry.idl < prev    next >
Text File  |  2006-05-08  |  7KB  |  198 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Radha Kulkarni <radha@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. /**
  40.  * The interface to nsISHentry. Each document or subframe in 
  41.  * Session History will have a nsISHEntry associated with it which will
  42.  * hold all information required to recreate the document from history
  43.  * 
  44.  */
  45. #include "nsIHistoryEntry.idl"
  46.  
  47. interface nsILayoutHistoryState;
  48. interface nsIContentViewer;
  49. interface nsIURI;
  50. interface nsIInputStream;
  51. interface nsIDocShellTreeItem;
  52. interface nsISupportsArray;
  53. %{C++
  54. struct nsRect;
  55. %}
  56. [ref] native nsRect(nsRect);
  57.  
  58. [scriptable, uuid(542a98b9-2889-4922-aaf4-02b6056f4136)]
  59. interface nsISHEntry : nsIHistoryEntry
  60. {
  61.     /** URI for the document */
  62.     void setURI(in nsIURI aURI);
  63.  
  64.     /** Referrer URI */
  65.     attribute nsIURI referrerURI;
  66.  
  67.     /** Content viewer, for fast restoration of presentation */
  68.     attribute nsIContentViewer contentViewer;
  69.  
  70.     /** Whether the content viewer is marked "sticky" */
  71.     attribute boolean sticky;
  72.  
  73.     /** Saved state of the global window object */
  74.     attribute nsISupports windowState;
  75.  
  76.     /**
  77.      * Saved position and dimensions of the content viewer; we must adjust the
  78.      * root view's widget accordingly if this has changed when the presentation
  79.      * is restored.
  80.      */
  81.     [noscript] void getViewerBounds(in nsRect bounds);
  82.     [noscript] void setViewerBounds([const] in nsRect bounds);
  83.  
  84.     /**
  85.      * Saved child docshells corresponding to contentViewer.  There are weak
  86.      * references since it's assumed that the content viewer's document has
  87.      * an owning reference to the subdocument for each shell.  The child shells
  88.      * are restored as children of the parent docshell, in this order, when the
  89.      * parent docshell restores a saved presentation.
  90.      */
  91.  
  92.     /** Append a child shell to the end of our list. */
  93.     void addChildShell(in nsIDocShellTreeItem shell);
  94.  
  95.     /**
  96.      * Get the child shell at |index|; returns null if |index| is out of bounds.
  97.      */
  98.     nsIDocShellTreeItem childShellAt(in long index);
  99.  
  100.     /**
  101.      * Clear the child shell list.
  102.      */
  103.     void clearChildShells();
  104.  
  105.     /** Saved refresh URI list for the content viewer */
  106.     attribute nsISupportsArray refreshURIList;
  107.  
  108.     /**
  109.      * Ensure that the cached presentation members are self-consistent.
  110.      * If either |contentViewer| or |windowState| are null, then all of the
  111.      * following members are cleared/reset:
  112.      *  contentViewer, sticky, windowState, viewerBounds, childShells,
  113.      *  refreshURIList.
  114.      */
  115.     void syncPresentationState();
  116.  
  117.     /** Title for the document */
  118.     void setTitle(in AString aTitle);
  119.  
  120.     /** Post Data for the document */
  121.     attribute nsIInputStream postData;
  122.  
  123.     /** LayoutHistoryState for scroll position and form values */
  124.     attribute nsILayoutHistoryState layoutHistoryState;
  125.  
  126.     /** parent of this entry */
  127.     attribute nsISHEntry parent;
  128.  
  129.     /**
  130.      * The loadType for this entry. This is typically loadHistory except
  131.      * when reload is pressed, it has the appropriate reload flag
  132.      */
  133.     attribute unsigned long loadType;
  134.  
  135.     /**
  136.      * An ID to help identify this entry from others during
  137.      * subframe navigation
  138.      */
  139.     attribute unsigned long ID;
  140.  
  141.     /**
  142.      * pageIdentifier is an integer that should be the same for two entries
  143.      * attached to the same docshell only if the two entries are entries for
  144.      * the same page in the sense that one could go from the state represented
  145.      * by one to the state represented by the other simply by scrolling (so the
  146.      * entries are separated by an anchor traversal or a subframe navigation in
  147.      * some other frame).
  148.      */
  149.     attribute unsigned long pageIdentifier;
  150.  
  151.     /** attribute to set and get the cache key for the entry */
  152.     attribute nsISupports cacheKey;
  153.  
  154.     /** attribute to indicate whether layoutHistoryState should be saved */
  155.     attribute boolean saveLayoutStateFlag;
  156.  
  157.     /** attribute to indicate whether the page is already expired in cache */
  158.     attribute boolean expirationStatus;
  159.  
  160.     /**
  161.      * attribute to indicate the content-type of the document that this
  162.      * is a session history entry for
  163.      */
  164.     attribute ACString contentType; 
  165.  
  166.     /** Set/Get scrollers' positon in anchored pages */
  167.     void setScrollPosition(in long x, in long y);
  168.     void getScrollPosition(out long x, out long y);
  169.  
  170.     /** Additional ways to create an entry */
  171.     void create(in nsIURI URI, in AString title,
  172.                 in nsIInputStream inputStream,
  173.                 in nsILayoutHistoryState layoutHistoryState,
  174.                 in nsISupports cacheKey, in ACString contentType);
  175.  
  176.     nsISHEntry clone();
  177.  
  178.     /** Attribute that indicates if this entry is for a subframe navigation */
  179.     void setIsSubFrame(in boolean aFlag);
  180.  
  181.     /** Return any content viewer present in or below this node in the
  182.         nsSHEntry tree.  This will differ from contentViewer in the case
  183.         where a child nsSHEntry has the content viewer for this tree. */
  184.     nsIContentViewer getAnyContentViewer(out nsISHEntry ownerEntry);
  185. };
  186.  
  187.  
  188. %{ C++
  189. // {BFD1A791-AD9F-11d3-BDC7-0050040A9B44}
  190. #define NS_SHENTRY_CID \
  191. {0xbfd1a791, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}}
  192.  
  193. #define NS_SHENTRY_CONTRACTID \
  194.     "@mozilla.org/browser/session-history-entry;1"
  195.  
  196. %}
  197.  
  198.